﻿<!--#include file="include/Money_ratio.asp"-->
<!--#include file="include/conn_f.asp"-->
<!--#include file="top.asp"-->
<!--#include file="left.asp"-->
<%
keywords=left(SafeRequest("keywords",0),20)
%>

<div class="content">

<style>
    .left
    {
        width: 80%;
        float: left;
        text-align: left;
        margin: 0px;
        overflow: hidden;
        white-space: nowrap;
    }
    .right
    {
        width: 20%;
        float: left;
        text-align: right;
        margin: 0px;
        padding: 0px;
        overflow: hidden;
        white-space: nowrap;
    }
</style>
<% 
Dim tipFlag
tipFlag=False 

Response.Write "<div style='text-align:center;'>搜索结果:<br />&nbsp;&nbsp;关键词:<b>"&keywords&"</b></div>"
'显示查询到的游戏
sql="select game_id,game_name from game where game_name like '%"&keywords&"%' and isShow=1 order by game_name"
Set rs=server.CreateObject("ADODB.RecordSet")
rs.cursorlocation=3
rs.open sql,conn,1,1
If Not (rs.eof And rs.bof) Then 
    tipFlag=True  
%>
<table align="center" width="95%" border="0" cellspacing="2" cellpadding="2">
    <tr>
        <td align="left" colspan="8" style="color: #0000ff;">
            查询到的相关游戏
        </td>
    </tr>
    <%
        For i=1 To rs.recordcount Step 8
            Response.Write "<tr>"
                For j=1 To 8
                    Response.Write "<td align=""left"" width=""12%""><img src=""image/ico_1.jpg"" /> <a href="""&MapUrl2("cardbygame", "game_id", rs("game_id"))&""" title="""&rs("game_name")&""">"&rs("game_name")&"</a></td>"
                    rs.movenext
                    If rs.eof Then Exit For 
                Next 
            Response.Write "</tr>"
            If rs.eof Then Exit For 
        Next 
    %>
    <tr>
        <td align="left" colspan="8" style="background-image: url('image/ico_2.jpg'); background-repeat: repeat-x;">
        </td>
    </tr>
</table>
<%
End If 
rs.close
Set rs=Nothing 

Response.Write "<table align='center' width='95%' border='0' cellspacing='2' cellpadding='2'>"
Response.Write "<tr><td align='left' colspan='8' style='color:#0000ff;'>查询到的相关卡种</td></tr>"

'显示查询到的相关卡种
sql="select card_info_id,card_name,photo from card_infor where card_name like '%"&keywords&"%' and onsale=1 order by best desc,hot desc"
Set rs=conn.execute(sql)

while Not rs.eof  
    Response.Write "<tr><td align=""left"" width=""25%""><img src=""image/ico_1.jpg"" border=""0"">&nbsp;"	
    Response.Write "<a href="""&MapUrl2("cardsell", "id", rs("card_info_id"))&""" title="""&rs("card_name")&""">"&rs("card_name")&"</a></td><td><a href="""&MapUrl2("cardsell", "id", rs("card_info_id"))&"""><img src='photo/"&rs("photo")&"' width='100' /></a></td></tr>"
    rs.movenext				
    tipFlag=True 		
wend
Response.Write "</table>"



'显示游戏币
sql="select gameCoinId,gameCoinName,photo_fileName from gameCoin where onsale=1 and gameCoinName like '%"&keywords&"%' order by gameCoinName"
Set rs=server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,1,1
If Not (rs.eof And rs.bof) Then 
    tipFlag=True   
    Response.Write "<table align=""center"" width=""95%"" border=""0"" class=""unnamed1"" cellspacing=""2"" cellpadding=""2""><tr><td valign=""top"" style=""color:#0000ff;padding:15px 0px;""><b>游戏币</b></td></tr>"
    Do While Not rs.eof
        Response.Write "<tr><td align=""center""><a href="""&MapUrl2("gameCoin", "gameCoinId", rs("gameCoinId"))&""" title="""&rs("gameCoinName")&"""><Img src=""photo/"&rs("photo_fileName")&""" width=""150"" alt="""&rs("gameCoinName")&""" border=""0""></a><div style=""margin:5px 0px;""></div>"
        Response.Write "<a href="""&MapUrl2("gameCoin", "gameCoinId", rs("gameCoinId"))&""" title="""&rs("gameCoinName")&""">"&rs("gameCoinName")&"</a></td></tr>"
        rs.movenext
        If rs.eof Then Exit Do 
    Loop
    Response.Write "</table>"
End If
rs.close
Set rs=Nothing 
'----------
If	tipFlag=False Then 
    Response.Write "<div style=""text-align:center;"">暂无相关信息，请重新查询</div>"
End If 
%>

</div>
<!--#include file="bottom.asp"-->
